<h1>{if isset($smarty.get.id)}Edit{else}New{/if} {$smarty.get.type|capitalize}</h1>
<form action="index.php?mod=admin&amp;action=manage&amp;type={$smarty.get.type}" method="post">
<p>
Title:<br />
<input type="text" name="title" value="{$row.title}" size="64" maxlength="128" />
</p>
<p>
<textarea cols="55" rows="20" name="content" id="wysiwyg">{$row.content}</textarea>
</p>
<p>
Tags: <input type="text" name="tags" value="{$row.tags}" size="64" maxlength="200" />
</p>
<p>
<input type="checkbox" name="published" value="1"{if $row.published == 1} checked="checked"{/if} onclick="togglePub(this.checked);" /> Published
</p>
{if isset($row.approved)}
<p>
<input type="checkbox" name="comments" value="1"{if $row.approved} checked="checked"{/if} /> Enable Comments
</p>
{/if}
{if $smarty.get.type == 'news'}
<p>
<input type="checkbox" name="sticky" value="1"{if $row.sticky == 1} checked="checked"{/if} /> Sticky at top of front page
</p>
{elseif $smarty.get.type == 'article'}
<p>
<input type="checkbox" name="menu" value="1"{if count($menu) > 0} checked="checked"{/if} /> Add to navigation menu
</p>
{/if}
<p>
Published Date: <input type="text" name="date" id="calendar" value="{$row.pubdate}" size="32" maxlength="64" />
</p>
{* TODO: Filter picker
<div>
{foreach from=$filters item=v}
	{if !is_dir("./filters/$v") && preg_match('/^([A-Z]|[a-z]|_)/',$v)}
		<input type="checkbox" value="{$v}"{if $v eq $config.sitetheme} selected="selected"{/if}/> {$v}
    {/if}
{/foreach}
</div>
*}
<input type="hidden" name="type" value="{$smarty.get.type}" />
<input type="hidden" name="id" value="{$row.id}" />
<input type="submit" name="savecontent" value="Save" /> <input type="submit" name="cancel" value="Cancel" />
</form>
